package com.qdlc.p2p.biz.executer.impl;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.qdlc.p2p.biz.executer.BaseExecuter;
import com.qdlc.p2p.common.constant.Global;
import com.qdlc.p2p.common.constant.LogTplNid;
import com.qdlc.p2p.dal.util.SystemConfigs;

/**
 * 用户托管存钱罐收益到账，添加资金日志
 *
 * @author ygw
 * @version 2.0
 * @date 2015年11月18日 上午10:37:14
 */
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class SetBonusExecuter extends BaseExecuter {

    @Override
    public void handleAccountWithLog() {
        Global.setTransfer(LogTplNid.LOG_TPL_KEY, LogTplNid.SINA_BONUS);
        Global.setTransfer("web_url", WEB_URL);
        accountService.addUseMoneyAndTotal(super.user.getUserId(), SystemConfigs.ADMIN_ID, super.money);
    }
}
